package com.ma.crawl_book;

import com.ma.crawl_book.controller.CrawlBook;
import com.ma.crawl_book.controller.CrawlListBook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class MyApplicationRunner implements ApplicationRunner {

    @Autowired
    CrawlListBook crawlListBook;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println("项目启动");
        crawlListBook.startCrawl();
    }
}
